package com.mattidroid.spiegel;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class AlertClass extends AlertDialog implements OnClickListener {
	
	Button okButton;

	public AlertClass(Context context) {
		super(context);
	
		setMessage(this.getContext().getString(R.string.msg_areyousure));
        setTitle(this.getContext().getString(R.string.good_bye));
        setButton(BUTTON_POSITIVE,this.getContext().getString(R.string.yes), new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface arg0, int arg1) {
                System.exit(0);
            }
        });
        setButton(BUTTON_NEGATIVE,this.getContext().getString(R.string.no), new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface arg0, int arg1) {
            }
        });		
	}
	
	@Override
	public void onClick(View v) {
		if (v == okButton)
			dismiss();
	}
	
}
